<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <style type="text/css">
    	div input{
    		height: 25px;
    	}
    </style>
  </head>
  <body>
    <%@ include file="look.jsp"%>
	<div class="container">
		<form class="form-horizontal" action="goodsinlist" id="searchForm" method="get" style="margin-bottom:0px;">
			<div id="myModal" class="modal hide fade in" style="dispaly:none;">
				<div class="modal-header">
					<h3>自定义搜索</h3>
				</div>
				<div class="modal-body">
					<fieldset>
						<div class="control-group">
							<label class="control-label">进货单号</label>
							<div class="controls">
								<input type="text" name="goodin.id"/>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">操作员</label>
							<div class="controls">
								<input type="text" name="operator.username" />
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">商品编号</label>
							<div class="controls">
								<input type="text" name="goods.id"/>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">供应商编号</label>
							<div class="controls">
								<input type="text" name="provider.id"/>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">销售时间</label>
							<div class="controls">
								<input type="text" class="datepicker" name="starttime"/>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">到</label>
							<div class="controls">
								<input type="text" class="datepicker" name="endtime"/>
							</div>
						</div>
					</fieldset>
				</div>
				<div class="modal-footer">
					<button class="btn btn-success" type="submit"><i class="icon-search icon-white"></i>搜索</button>
					<input type="button" class="btn" data-dismiss="modal" value="取消"/>
				</div>
			</div>
		</form>
		<a class="btn btn-primary btn-large" href="#myModal" data-toggle="modal"><i class="icon-search icon-white"></i>搜索记录</a><hr/>
	    <table class="table table-bordered" style="border-width: 2px">
			<thead>
				<tr>
					<th>进货单号</th>
					<th>商品编号</th>
					<th>商品名称</th>
					<th>单价</th>
					<th>进货数量</th>
					<th>总金额</th>
					<th>供应商编号</th>
					<th>供应商名称</th>
					<th>进货时间</th>
					<th>操作员</th>
			  	</tr>
		 	</thead>
		 	<tbody>
		 		<c:forEach items="${goodsinList}" var="goodsin">
		 			<tr>
						<td>${goodsin.id}</td>
						<td>${goodsin.goods.id}</td>
						<td>${goodsin.goods.goodsname}</td>
						<td>${goodsin.goods.price }</td>
						<td>${goodsin.inputnum }</td>
						<td>${goodsin.goods.price * goodsin.inputnum }</td>
						<td>${goodsin.provider.id }</td>
						<td>${goodsin.provider.providername }</td>
						<td>${goodsin.time}</td>
						<td>${goodsin.operator.username}</td>
					</tr>
				</c:forEach>
		 	</tbody>
		</table>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".datepicker").datepicker({
    			changeMonth:true,
    			option: $.datepicker.regional["zh-CN"]
    		});
			
		});
	
	</script>
  </body>
</html>
